import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Home',
    component: Home
    // redirect: 'superMarie'
  },
  {
    path: '/test',
    name: 'test',
    component: () => import('../views/test/index.vue')
  }, {
    path: '/2048',
    name: '2048',
    component: () => import('../views/2048/index.vue')
  }, {
    path: '/mine_clearance',
    name: 'mine_clearance',
    component: () => import('../views/mine_clearance/index.vue')
  }, {
    path: '/flappybird',
    name: 'flappybird',
    component: () => import('../views/flappybird/index.vue')
  }, {
    path: '/brick',
    name: 'brick',
    component: () => import('../views/brick/index.vue')
  }, {
    path: '/gobang',
    name: 'gobang',
    component: () => import('../views/gobang/index.vue')
  }, {
    path: '/plane',
    name: 'plane',
    component: () => import('../views/plane/index.vue')
  }, {
    path: '/superMarie',
    name: 'superMarie',
    component: () => import('../views/superMarie/index.vue')
  },{
    path: '*',
    redirect: 'Home'
  }
]

const router = new VueRouter({
  mode: 'history',
  // base: process.env.BASE_URL,
  base: '/',
  routes
})

export default router
